<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php if($home == true){ ?>
<div class="borderYellowLR980">
    <div class="oBorderYellowLR980">
        <div class="iBorderYellowLR980">
            <div class="itemLR">
                <!--LOOP-->
                <?php foreach($rows as $row){ ?>
                <div class="item100X125">
                    <div class="img">
                        <a href="<?php echo base_url(); ?>product/section/<?php echo $row->proSection; ?>/category/<?php echo $row->proCategory; ?>/detail/<?php echo $row->proID; ?>/<?php echo url($row->proName); ?>" class="vtip" title="<?php echo tip(base_url().multi_thumbnail('thumbnail250X205_', $row->proImage, IMAGE_PATH.'product/'.$row->proDirImage.'/'), true); ?>">
                            <img src="<?php echo base_url().multi_thumbnail('thumbnail90X100_', $row->proImage, IMAGE_PATH.'product/'.$row->proDirImage.'/'); ?>" width="90" height="100" alt="<?php echo $row->proName; ?>" />
                        </a>
                    </div>
                    <div class="txt"><?php if((int)$row->proPrice > 0){echo currency($row->proPrice).' '.$row->proCurrency;}else{echo lang('CALL');} ?></div>
                </div>
                <?php } ?>
                <!--LOOP-->
            </div>
        </div>
    </div>
</div>
<?php }elseif(count($rows) > 0){ ?>
<div class="module">
    <div class="oModule">
        <div class="iModule">
            <div class="title"><?php echo lang('POPULAR_PRODUCT'); ?></div>
            <div class="row">
                <!--LOOP-->
                <?php $first = true; ?>
                <?php foreach($rows as $row){ ?>
                <div class="row85" <?php if($first == true){echo 'style="border:0px;"';} ?>>
                    <div class="img">
                        <a href="<?php echo base_url(); ?>product/section/<?php echo $row->proSection; ?>/category/<?php echo $row->proCategory; ?>/detail/<?php echo $row->proID; ?>/<?php echo url($row->proName); ?>" class="vtip" title="<?php echo tip(base_url().multi_thumbnail('thumbnail250X205_', $row->proImage, IMAGE_PATH.'product/'.$row->proDirImage.'/'), true); ?>">
                            <img src="<?php echo base_url().multi_thumbnail('thumbnail73X70_', $row->proImage, IMAGE_PATH.'product/'.$row->proDirImage.'/'); ?>" width="73" height="70" alt="<?php echo $row->proName; ?>" />
                        </a>
                    </div>
                    <div class="info">
                        <div>
                            <a class="vtip <?php if((time() - (int)$row->proPostDate) <= (NEW_TIME*60)){echo 'new';} ?>" href="<?php echo base_url(); ?>product/section/<?php echo $row->proSection; ?>/category/<?php echo $row->proCategory; ?>/detail/<?php echo $row->proID; ?>/<?php echo url($row->proName); ?>" title="<?php echo tip(sub(strip_tags($row->proDetail), 50)); ?>"><b><?php echo sub($row->proName, 20); ?></b></a>
                        </div>
                        <div>
                            <span class="red"><b><?php if((int)$row->proPrice > 0){echo currency($row->proPrice).' '.$row->proCurrency;}else{echo lang('CALL');} ?></b></span>
                        </div>
                        <div class="star">
                            <?php for($i = 1; $i <= 5; $i++){ ?>
                            <?php if($i <= (int)$row->proVote){ ?>
                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow1.gif" align="absmiddle" alt="" />
                            <?php }else{ ?>
                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow0.gif" align="absmiddle" alt="" />
                            <?php } ?>
                            <?php } ?>
                            <span class="blue"><b>[<?php echo $row->proCountVote; ?>]</b></span>
                        </div>
                        <div>
                            <span class="gray"><?php echo lang('POST_AT'); ?>: <?php echo date_convert($row->proPostDate); ?></span>
                        </div>
                    </div>
                </div>
                <?php $first = false; ?>
                <?php } ?>
                <!--LOOP-->
            </div>
        </div>
    </div>
</div>
<?php } ?>